openGauss 5.0 一主两从 复制环境 搭建手册

您所在的位置:网站首页 oracle dataguard搭建 openGauss 5.0 一主两从 复制环境 搭建手册

openGauss 5.0 一主两从 复制环境 搭建手册

2023-05-08 23:06| 来源: 网络整理| 查看: 265

在之前的博客我们了解了单机版的openGauss安装。

 

Linux 7.6 平台 openGauss 3.1.1 单机版 安装手册https://www.cndba.cn/dave/article/116448

 

openGauss 修改 IP 地址 操作步骤https://www.cndba.cn/dave/article/116525

 

本篇我们看下主从复制环境的搭建过程。基本操作是一样的的差不多的,就是xml配置文件有些不同。

1环境信息 [[email protected] ~]# cat /etc/hosts 127.0.0.1 localhost 192.168.56.105 oracle 192.168.56.106 oracle2 192.168.56.107 oracle3 127.0.0.1 localhost #Gauss OM IP Hosts Mapping [[email protected] ~]#

安装依赖包:

yum -y install libaio-devel flex bison ncurses-devel glibc-devel patch redhat-lsb-core readline-devel python3 expect

注意这里需要保证所有节点时间同步,否认会报如下错误:

openGauss cm_ctl: SSL verify certificate failed 错误 解决方法https://www.cndba.cn/dave/article/116527

2配置XML 文件 [[email protected] software]# cat rep_config.xml : [[email protected] software]# 3初始化安装环境(root)

https://docs.opengauss.org/zh/docs/5.0.0/docs/InstallationGuide/%E5%88%9D%E5%A7%8B%E5%8C%96%E5%AE%89%E8%A3%85%E7%8E%AF%E5%A2%83.html

以下在节点1 操作即可。

解压安装文件:

tar -zxvf openGauss-5.0.0-CentOS-64bit-all.tar.gztar -zxvf openGauss-5.0.0-CentOS-64bit-om.tar.gz

进入script执行:

 

[[email protected] script]# ./gs_preinstall -U omm -G dbgrp -X /software/rep_config.xml Parsing the configuration file. Successfully parsed the configuration file. Installing the tools on the local node. Successfully installed the tools on the local node. Are you sure you want to create trust for root (yes/no)?yes Please enter password for root Password: Successfully created SSH trust for the root permission user. Setting host ip env Successfully set host ip env. Distributing package. Begin to distribute package to tool path. Successfully distribute package to tool path. Begin to distribute package to package path. Successfully distribute package to package path. Successfully distributed package. Are you sure you want to create the user[omm] and create trust for it (yes/no)? yes Preparing SSH service. Successfully prepared SSH service. Installing the tools in the cluster. Successfully installed the tools in the cluster. Checking hostname mapping. Successfully checked hostname mapping. Creating SSH trust for [omm] user. Please enter password for current user[omm]. Password: Checking network information. All nodes in the network are Normal. Successfully checked network information. Creating SSH trust. Creating the local key file. Successfully created the local key files. Appending local ID to authorized_keys. Successfully appended local ID to authorized_keys. Updating the known_hosts file. Successfully updated the known_hosts file. Appending authorized_key on the remote node. Successfully appended authorized_key on all remote node. Checking common authentication file content. Successfully checked common authentication content. Distributing SSH trust file to all node. Distributing trust keys file to all node successfully. Successfully distributed SSH trust file to all node. Verifying SSH trust on all hosts. Successfully verified SSH trust on all hosts. Successfully created SSH trust. Successfully created SSH trust for [omm] user. Checking OS software. Successfully check os software. Checking OS version. Successfully checked OS version. Creating cluster's path. Successfully created cluster's path. Set and check OS parameter. Setting OS parameters. Successfully set OS parameters. Warning: Installation environment contains some warning messages. Please get more details by "/software/script/gs_checkos -i A -h oracle,oracle2,oracle3 --detail". Set and check OS parameter completed. Preparing CRON service. Successfully prepared CRON service. Setting user environmental variables. Successfully set user environmental variables. Setting the dynamic link library. Successfully set the dynamic link library. Setting Core file Successfully set core path. Setting pssh path Successfully set pssh path. Setting Cgroup. Successfully set Cgroup. Set ARM Optimization. No need to set ARM Optimization. Fixing server package owner. Setting finish flag. Successfully set finish flag. Preinstallation succeeded. [[email protected] script]# 4执行安装(omm) [[email protected] ~]$ gs_install -X /software/rep_config.xml Parsing the configuration file. Check preinstall on every node. Successfully checked preinstall on every node. Creating the backup directory. Successfully created the backup directory. begin deploy.. Installing the cluster. begin prepare Install Cluster.. Checking the installation environment on all nodes. begin install Cluster.. Installing applications on all nodes. Successfully installed APP. begin init Instance.. encrypt cipher and rand files for database. Please enter password for database: Please repeat for database: begin to create CA cert files The sslcert will be generated in /data/openGauss/install/app/share/sslcert/om Create CA files for cm beginning. Create CA files on directory [/data/openGauss/install/app_a07d57c3/share/sslcert/cm]. file list: ['cacert.pem', 'server.key', 'server.crt', 'client.key', 'client.crt', 'server.key.cipher', 'server.key.rand', 'client.key.cipher', 'client.key.rand'] Non-dss_ssl_enable, no need to create CA for DSS Cluster installation is completed. Configuring. Deleting instances from all nodes. Successfully deleted instances from all nodes. Checking node configuration on all nodes. Initializing instances on all nodes. Updating instance configuration on all nodes. Check consistence of memCheck and coresCheck on database nodes. Successful check consistence of memCheck and coresCheck on all nodes. Configuring pg_hba on all nodes. Configuration is completed. Starting cluster. …… 5 验证 [[email protected] ~]$ gs_om -t status --detail [ CMServer State ] node node_ip instance state ------------------------------------------------------------------------------- 1 oracle 192.168.56.105 1 /data/openGauss/data/cmserver/cm_server Primary 2 oracle2 192.168.56.106 2 /data/openGauss/data/cmserver/cm_server Standby 3 oracle3 192.168.56.107 3 /data/openGauss/data/cmserver/cm_server Standby [ Cluster State ] cluster_state : Normal redistributing : No balanced : No current_az : AZ_ALL [ Datanode State ] node node_ip instance state --------------------------------------------------------------------------------- 1 oracle 192.168.56.105 6001 /data/openGauss/install/data/dn P Standby Normal 2 oracle2 192.168.56.106 6002 /data/openGauss/install/data/dn S Primary Normal 3 oracle3 192.168.56.107 6003 /data/openGauss/install/data/dn S Standby Normal [[email protected] ~]$


【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3